home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
gfx
/
opal
/
OpRxWind1.lzh
/
EmbossBrush.oprx
next >
Wrap
Text File
|
1993-02-03
|
3KB
|
119 lines
/* EmbossBrush.oprx: ARexx script for OpalPaint to Blind Emboss an image
* with a brush. Works best with large text, filled circles, and usually
* rounded shapes.
***** Brian Wind, February 3, 1993 *****
* Install in your OpalPaint rexx directory (opalpaint:rexx) or wherever
* you store your ARexx scripts (rexx:). Use OpalPaint's ARexx Control Item
* to set this script to a function key (i.e. type the script name into one
* of the function key boxes). Then make a brush in B1, B2, or B3. Press
* Amiga key and function key together, and answer a 'helluva' lot of
* questions (then you can delete those things you don't want in the script.
* Note: using a small rectangular brush doesn't work quite right in
* OpalPaint 1.4, if you need to do this, don't use the stencil option
*/
address 'OpalPaint_Rexx'
options Results
SaveSetUp
AskBool "Click on OK for Emboss or Cancel for Reverse Emboss"
if RC>5 then exit
else if result==0 then EMB=-1 /* reverse emboss */
else EMB=1 /* emboss */
AskBool "Click on OK for Blind Emboss or\n Cancel for Emboss using brush colors."
if RC>5 then exit
else if result==0 then BEMB=0 /* emboss using brush colors */
else BEMB=1 /* blind emboss */
AskBool "Click on Ok if you want a stencil to\nbe made for a cleaner emboss."
if RC>5 then exit
else if result==0 then UseST=0 /* cancel for no stencil */
else UseST=1 /* ok to use stencil */
AskInt 1 3 "Brush Number (1-3), click OK for default: Brush 1\nClick Cancel to abort."
if RC>4 then exit
else BN=result
/* if okay was pressed and no number was entered, use default brush 1 */
if BN=="" then BN=1
/* Set active brush */
ActiveBrush BN
AskInt 1 50 "Brightness of embossed edges (1-50)\nClick OK for default: 20\nClick Cancel to abort."
if RC>4 then exit
else BRILLDEPTH=result
/* if okay with no number entered, use default of 20 */
if BRILLDEPTH=="" then BRILLDEPTH=20
AskInt 1 3 "Separation of edges (1-3)\nClick OK for default: 1\nClick Cancel to abort."
if RC>4 then exit
else SEPE=result
/* if okay with no number entered, use default of 1 */
if SEPE=="" then SEPE=1
/* modify for emboss type */
SEPE=SEPE*EMB
AskBool "Click on the image to emboss\nor choose Cancel to abort."
if RC>5 | result==0 then exit
/* Let user click on image to place brush */
GetPoint
if RC>5 then exit
parse var result PX PY
/* Next statement for debug purposes */
/*askbool emb' 'usest' 'bn' 'brilldepth' 'sepe' 'PX' 'PY*/
/*Busy*/
/* set to freehand drawing tool */
FreeHand
/* if a stencil was chosen to protect center of emboss */
if useST==1 then
do
WorkMode STENCIL
PutBrush PX PY
WorkMode IMAGE
StenEnable useST
end
WorkMode IMAGE
/* Set Brilliance drawing mode and paste brush */
SetDrawMode 8 (BRILLDEPTH * -1)
PutBrush PX+SEPE PY+SEPE
SetDrawMode 8 BRILLDEPTH
PutBrush PX-SEPE PY-SEPE
/* check for non blind emboss */
if BEMB==0 then
do
StenEnable 0
SetDrawMode 1
ColorSource MULTICOLOR
PutBrush PX PY
end
/*NotBusy*/
RestoreSetUp
exit